package com.kqb.sgadmin.service.pipeline.create.context;

import com.kqb.sgadmin.model.dto.admin.AdminSaveDTO;
import lombok.Data;


/**
 * @author 杉果树皮
 */
@Data
public class AdminCreateContext {

    /**
     * 用户名（唯一）
     */
    private String username;

    /**
     * 加密后的密码（BCrypt）
     */
    private String password;

    /**
     * 昵称
     */
    private String nickname;

    /**
     * 性别
     */
    private Boolean gender;

    /**
     * 手机号（唯一）
     */
    private String phone;

    /**
     * 账号状态（0-禁用，1-启用）
     */
    private Boolean status;

    /**
     * 部门ID
     */
    private Integer deptId;

    public AdminCreateContext(AdminSaveDTO adminSaveDTO) {
        this.username = adminSaveDTO.getUsername();
        this.password = adminSaveDTO.getPassword();
        this.nickname = adminSaveDTO.getNickname();
        this.gender = adminSaveDTO.isGender();
        this.phone = adminSaveDTO.getPhone();
        this.status = adminSaveDTO.getStatus();
        this.deptId = adminSaveDTO.getDeptId();
    }
}
